package br.com.news.util;

import android.content.Context;
import android.net.ConnectivityManager;

/**
 * Classe utilitaria de conexão
 * 
 * @author Jefferson
 * @since 16/03/2013
 */
public class ConnectionUtils {

	public static boolean isOnline( Context context) {
	    ConnectivityManager cm =(ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
	    return cm.getActiveNetworkInfo() != null && 
	       cm.getActiveNetworkInfo().isConnectedOrConnecting();
	}
	
}
